import request from '@/utils/request'
import defaultSettings from '@/settings'

// 消息配置维护查询
export const monitorConfMaintainUrlConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/transactionManage/msgManageControl/MonitorConfMaintain/search`,
}

// 消息配置审核查询
export const monitorConfApproveUrlConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/transactionManage/msgManageControl/MonitorConfApprove/search`,
}

// 查询可选择监控事件列表
export function getMonitorConfList(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/msgManageControl/MonitorConfMaintain/getMonitorConfList`,
    method: 'post',
    data,
  })
}

// 消息配置新增提交
export function monitorConfAdd(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/msgManageControl/MonitorConfMaintain/save`,
    method: 'post',
    data,
  })
}

// 消息维护修改详情
export function monitorConfDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/msgManageControl/MonitorConfMaintain/detail`,
    method: 'get',
    params: data,
  })
}

// 消息配置修改提交
export function monitorConfUpdate(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/msgManageControl/MonitorConfMaintain/updateSave`,
    method: 'post',
    data,
  })
}

// 消息配置维护删除
export function monitorConfDelete(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/msgManageControl/MonitorConfMaintain/delete`,
    method: 'post',
    data,
  })
}

// 消息配置审核详情
export function monitorConfApproveDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/msgManageControl/MonitorConfApprove/detail`,
    method: 'get',
    params: data,
  })
}

// 消息配置审批通过
export function monitorConfApprove(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/msgManageControl/MonitorConfApprove/approve`,
    method: 'post',
    data,
  })
}

// 消息配置审批拒绝
export function monitorConfReject(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/msgManageControl/MonitorConfApprove/reject`,
    method: 'post',
    data,
  })
}

